package com.twang.stock.controller.common;

import com.twang.stock.dto.ReviewCompleteRequest;
import com.twang.stock.dto.ReviewResponse;
import com.twang.stock.service.ReviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/review")
public class ReviewController {
    @Autowired
    private ReviewService reviewService;

    // 处理用户完成复习的请求
    @PostMapping("/complete")
    public ReviewResponse completeReview(@RequestBody ReviewCompleteRequest request) {
        return reviewService.handleReviewCompletion(request);
    }
}
